from machine import Pin

def open_led(color):
    if color == b"red":
        led = Pin(13, Pin.OUT)
        if led.value() == 0:
            led.value(1)
        else:
            led.value(0)
    if color == b"green":
        led = Pin(12, Pin.OUT)
        if led.value() == 0:
            led.value(1)
        else:
            led.value(0)
    if color == b"blue":
        led = Pin(14, Pin.OUT)
        if led.value() == 0:
            led.value(1)
        else:
            led.value(0)